package com.shangcheng.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.shangcheng.dubbo.mappers.PrefrenceAreaMapper;
import com.shangcheng.model.domain.PrefrenceArea;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author JavaClimber
 * @version 1.0
 * @date 2022/5/12 0012 zihao
 */
@DubboService
public class PrefrenceAreaApiImpl implements PrefrenceAreaApi {

    @Autowired
    private PrefrenceAreaMapper prefrenceAreaMapper;

    //查询所有
    @Override
    public List<PrefrenceArea> listAll() {

        List<PrefrenceArea> prefrenceAreas = prefrenceAreaMapper.selectList(null);

        System.out.println(prefrenceAreas.toString());
        return prefrenceAreas;
    }
}
